package com.yyc.produce.service.impl;

import com.yyc.produce.dataobject.ProductInfo;
import com.yyc.produce.enums.ProductStatusEnum;
import com.yyc.produce.repository.ProduceInfoRepository;
import com.yyc.produce.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author
 */
@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProduceInfoRepository produceInfoRepository;


    @Override
    public List<ProductInfo> findUpAll() {
        return produceInfoRepository.findByProductStatus(ProductStatusEnum.UP.getCode());
    }
}
